1. Technical Field
This invention generally relates to data processing and communications, and more specifically relates to a method and apparatus for dynamically transmitting data packets in a packet train.
2. Background Art
Computer systems communicate with each other over computer networks. Such networks include multiple nodes, which are typically computers, that may be distributed over vast distances and connected by communications links. Nodes in the computer network communicate with each other using data packets sent over the communication links. The data packets are the basic units of information transfer. A data packet contains data surrounded by control and routing information supplied by the various nodes.
Sending, receiving, and processing of packets have an overhead, or associated cost. That is, it takes time for the central processing unit (CPU) at a node to receive a packet, to examine the packet's control information, and to determine the next action. One way to reduce the packet overhead is a method called packet training. Packet training consolidates individual packets into a group, called a train, so that a node can process the entire train of packets at once. The term “train” is in reference to a train of railroad cars. The packets are formed into a group of sequential packets like a line of railroad cars or a train. Processing a train of packets has less overhead, and thus better performance, than processing each packet individually.
In a typical training method, a node will accumulate packets until the train reaches a fixed target-length. Then the node will process or retransmit the entire packet train at once. In order to ensure that the accumulated packets are eventually handled since the packet arrival rate at the node is unpredictable, the method will start a timer when the node receives the train's first packet. When the timer expires, the node will end the train and process it even if train has not reached its target length. This training method works well in times of heavy packet-traffic because the timer never expires. But in times of light packet-traffic, the packets that the node accumulates experience poor performance while waiting in vain for additional packets to arrive, and the ultimate timer expiration introduces additional processing overhead.
In another prior art packet training method, described in U.S. Pat. No. 5,859,853 to David Glen Carlson and incorporated herein by reference, the system dynamically adjusts the number of packets sent in a train from a node to reflect the rate-of-packets arriving at a node in a network. A packet controller determines the optimum train-length, that is the optimum number-of-packets to send in a train. The node also has a timer interval, which is the maximum time-to-wait before sending the next train. The packet controller samples the packet arrival-rate and calculates the elapsed time to receive a number-of-packets in a train. This elapsed time is referred to as a sampling interval. The packet controller calibrates the optimum train-length when the sampling interval changes significantly from the historic sampling-interval. This method provides dynamic training of packets but does not efficiently handle message latency, particularly for burst mode communication traffic in a low CPU utilization environment.
Packet training can save a significant amount of CPU load in a heavy communications workload environment. However, packet training can have a detrimental affect on the latency of messages sent over the network. When a message is sent with packet training, the message may be delayed while a packet train is being assembled. Thus there is a tradeoff between CPU load and communication latency when using packet training. Packet training decreases the load on the CPU but may increase the time for a message to be sent over the network due to the delay in building a train of packets. Without a way to optimize the tradeoff between CPU loading and network latency, the computer industry will continue to suffer from sub-optimum performance from a packet data network.